home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Lightspeed C SKEL fldr / Skel report.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-06-17  |  1.0 KB  |  39 lines  |  [TEXT/KAHL]

  1. #include <WindowMgr.h>        
  2. #include <MenuMgr.h>
  3. #include <EventMgr.h>
  4. #include "Skel defines.h"
  5. #include "Skel globals.h"
  6. #include <DialogMgr.h>
  7.  
  8. /* 
  9. Print a string in dialog box
  10. ############################   Report   #################################
  11.  
  12. We put up a dialog box, show the string, and wait for user to hit OK.
  13. */
  14.  
  15. report (reportstr)
  16. char   **reportstr;
  17.  
  18. #define rptboxid 257        /* ID of our report dialog in resource
  19.                                    file */
  20. #define rpttext 2            /* Item # of dialog's report text */
  21. {
  22.     long     itemhit;        /* which Item was clicked on (only OK
  23.                                    avail) */
  24.     DialogPtr reportptr;
  25.  
  26.  
  27.  
  28.     ParamText (*reportstr, "", "", "");/* set text to display */
  29.     reportptr = GetNewDialog (rptboxid, 0L, (long) - 1);
  30.                 /* get from Resource file; NIL => use heap
  31.                    storage; -1 => make dlg frontmost */
  32.  
  33.     ModalDialog (0L, &itemhit);
  34.                 /* carry out dialog; NIL => no FilterProc;
  35.                    return Item Hit when done */
  36.     DisposDialog (reportptr);    /* release storage and remove dialog from
  37.                    screen */
  38. }                /* Report */
  39.